package com.zyh.service.impl;

import com.zyh.entity.Book;
import com.zyh.mapper.BookMapper;
import com.zyh.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> selectOrderByInventoryDesc() {
        return bookMapper.selectOrderByInventoryDesc();
    }

    @Override
    public List<Book> selectOrderBySaleNumDesc() {
        return bookMapper.selectOrderBySaleNumDesc();
    }

    @Override
    public List<Book> selectOrderByGroundingDateDesc() {
        return bookMapper.selectOrderByGroundingDateDesc();
    }

    @Override
    public List<Book> selectOrderByDateAndSaleDesc() {
        return bookMapper.selectOrderByDateAndSaleDesc();
    }

    @Override
    public Book selectByBookId(Integer bookId) {
        return bookMapper.selectByBookId(bookId);
    }

    @Override
    public List<Book> selectByLevelCid(Integer cId) {
        return bookMapper.selectByLevelCid(cId);
    }

    @Override
    public List<Book> selectByLevelParentId(Integer cId) {
        return bookMapper.selectByLevelParentId(cId);
    }
}
